#include "CaseDB/Connection.hpp"
#include "CaseDb/Impl/ConnectionImpl.hpp"

namespace CaseDB
{

Connection::~Connection()
{
	delete pImpl_;
}

// ---------------------------------------------------------------------------------------------------------------------

Connection::Connection( const std::string&, Impl::ConnectionImpl* pImpl)
	: pImpl_( pImpl)
{
}

// ---------------------------------------------------------------------------------------------------------------------

void Connection::open()
{
	pImpl_->open();
}

// ---------------------------------------------------------------------------------------------------------------------

void Connection::close()
{
	pImpl_->close();
}

// ---------------------------------------------------------------------------------------------------------------------

void Connection::execute( Statement& statement)
{
	pImpl_->execute( statement);
}

// ---------------------------------------------------------------------------------------------------------------------

void Connection::execute( Statement& statement, RecordSet& results )
{
	pImpl_->execute( statement, results);
}

} // namespace CaseDB
